﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Sample.aspx.cs" Inherits="DrawMap.Sample" %>

<!-- Step 1 - register the map viewer -->
<%@ Register Src="~/MapViewer_Control.ascx" tagname="MapViewer" tagprefix="mv" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>The Americas</title>

    <style type="text/css">
        img 
        {
            border:0;
        }
        div.ToolTip
        {
            font-family:Tahoma, Sans-Serif;
            font-size:x-small;
            border:solid, 1, black;
        }
        .scaletext
        {
            font-family:Tahoma, Sans-Serif;
            font-size:x-small;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <label>Country:</label>&nbsp;
        <asp:TextBox runat="server" ID="country" Width="50" style="width:8em;" />&nbsp;&nbsp;
        <asp:Button runat="server" ID="doit" Text="Get" onclick="doit_Click" />
        <hr />
    </div>
    <div>
        <!-- Step 2 - add the map viewer to the page -->
        <mv:MapViewer ID="ViewMapControl" runat="server" />

        <!-- Step 3 - define a data source for each geometry table (layer) to draw -->
        <asp:SqlDataSource ID="SqlDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:GISLocalConnectionString %>" 
            SelectCommand="SELECT [Country], [geom] FROM [americas_adm0]">
        </asp:SqlDataSource>
    </div>
    </form>
    </body>
</html>
